<?php

namespace App\Models;

use Illuminate\Pagination\LengthAwarePaginator;

class GoodsBrand extends Model
{
    protected $table = 'yf_goods_brand';
    protected $primaryKey = 'brand_id';
    public $timestamps = false;
    protected $guarded = ['brand_id'];

    public static function enableRecommendBrands() : LengthAwarePaginator
    {
        return self::whereBrandRecommend(1)
            ->whereBrandEnable(1)
            ->oldest('brand_displayorder')
            ->paginate(100);
    }
}
